package com.easwift.qsp.util;

/**
 * 日志工具类
 * 
 * @author Administrator
 *
 */
public class LogUtils {

	/**
	 * 打印帧数据
	 * 
	 * @param bytes
	 */
	public static void printFrame(byte[] bytes) {
		if (bytes != null && bytes.length > 0) {
			for (byte b : bytes) {
				if (b < 0) {
					System.out.print(Integer.toHexString(256 + b));
				} else if (b < 16) {
					System.out.print("0" + Integer.toHexString(b));
				} else {
					System.out.print(Integer.toHexString(b));
				}
				System.out.print(" ");
			}
			System.out.println();
		}
	}

}